FROM node:8 as builder
WORKDIR /tmp
COPY . /tmp
RUN npm install --registry=https://registry.npm.taobao.org
RUN npm run build
RUN ls dist

FROM nginx:latest

COPY --from=builder /tmp/dist/ /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/conf.d/default.conf
